package com.vulb.activity;

import com.vulb.protocal.http.Response;

import android.app.Activity;
import android.os.Handler;
import android.os.Message;

public class BasicActivity extends Activity {
    public static final int HTTP_RESPONSE_STATUS = 110;
    
    protected Handler mHttpResponseHandler = new Handler(new Handler.Callback() {
        @Override
        public boolean handleMessage(Message msg) 
        {
            if (msg.what == HTTP_RESPONSE_STATUS) 
            {
                switch (msg.arg1) 
                {
                    case Response.SESSION_ERROR:
                        //TODO alert login again and go to login page.
                        break;
                    case Response.SYSTEM_MAINTANANCE:
                        //TODO alert, and exit application
                        break;
                }
            }
            
            return false;
        }
    });
    
    
}
